<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>EOS.IO: Storage Contract</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="eos-logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">EOS.IO
   &#160;<span id="projectnumber">DAWN1.1.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li class="current"><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">Storage Contract<div class="ingroups"><a class="el" href="group__examplecontract.html">Example Contract</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>Defines the storage contract example.  
<a href="#details">More...</a></p>
<div class="dynheader">
Collaboration diagram for Storage Contract:</div>
<div class="dyncontent">
<center><table><tr><td><img src="group__storageapi.png" border="0" alt="" usemap="#group____storageapi"/>
<map name="group____storageapi" id="group____storageapi">
<area shape="rect" id="node1" href="group__examplecontract.html" title="Example Contract. " alt="" coords="5,7,132,33"/>
<area shape="rect" id="node3" href="group__currencyapi.html" title="Defines the curency contract example. " alt="" coords="500,7,629,33"/>
</map>
</td></tr></table></center>
</div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_t_o_k_e_n___n_a_m_e_1_1_transfer.html">TOKEN_NAME::Transfer</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:gabbe71e05a36e97f4844809600c08f432"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="structeos_1_1token.html">eosio::token</a>&lt; <a class="el" href="group__types.html#gaaa5d1cd013383c889537491c3cfd9aad">uint64_t</a>, <a class="el" href="group__types.html#gaf9c1edb0e0da55ec6ba09f32f6839529">N</a>(storage)&gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__storageapi.html#gabbe71e05a36e97f4844809600c08f432">TOKEN_NAME::StorageTokens</a></td></tr>
<tr class="separator:gabbe71e05a36e97f4844809600c08f432"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gaa4d95e1e82c4c995e09e400878511924"><td class="memItemLeft" align="right" valign="top">struct&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__storageapi.html#gaa4d95e1e82c4c995e09e400878511924">TOKEN_NAME::PACKED</a> (<a class="el" href="struct_account.html">Account</a>)</td></tr>
<tr class="memdesc:gaa4d95e1e82c4c995e09e400878511924"><td class="mdescLeft">&#160;</td><td class="mdescRight">row in <a class="el" href="struct_t_o_k_e_n___n_a_m_e_1_1_account.html" title="row in Account table stored within each scope ">Account</a> table stored within each scope  <a href="group__storageapi.html#gaa4d95e1e82c4c995e09e400878511924">More...</a><br /></td></tr>
<tr class="separator:gaa4d95e1e82c4c995e09e400878511924"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7a45c6ffe0972cf0b36332888094d535"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__types.html#gaaa5d1cd013383c889537491c3cfd9aad">uint64_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__storageapi.html#ga7a45c6ffe0972cf0b36332888094d535">TOKEN_NAME::getQuotaUsed</a> (<a class="el" href="group__types.html#gad67b43dc23285b01176f4c181c59fc23">AccountName</a> owner)</td></tr>
<tr class="separator:ga7a45c6ffe0972cf0b36332888094d535"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae28d4ae2e7427857dbae688d353fcba3"><td class="memItemLeft" align="right" valign="top">struct&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__storageapi.html#gae28d4ae2e7427857dbae688d353fcba3">TOKEN_NAME::PACKED</a> (Link)</td></tr>
<tr class="separator:gae28d4ae2e7427857dbae688d353fcba3"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:ga459112cbf883226edcb02b35a674ddcd"><td class="memItemLeft" align="right" valign="top">StorageTokens&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__storageapi.html#ga459112cbf883226edcb02b35a674ddcd">TOKEN_NAME::Transfer::quantity</a></td></tr>
<tr class="separator:ga459112cbf883226edcb02b35a674ddcd"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<h2 class="groupheader">Typedef Documentation</h2>
<a class="anchor" id="gabbe71e05a36e97f4844809600c08f432"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="structeos_1_1token.html">eosio::token</a>&lt;<a class="el" href="group__types.html#gaaa5d1cd013383c889537491c3cfd9aad">uint64_t</a>, <a class="el" href="group__types.html#gaf9c1edb0e0da55ec6ba09f32f6839529">N</a>(storage)&gt; <a class="el" href="group__storageapi.html#gabbe71e05a36e97f4844809600c08f432">TOKEN_NAME::StorageTokens</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Defines a storage token </p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ga7a45c6ffe0972cf0b36332888094d535"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__types.html#gaaa5d1cd013383c889537491c3cfd9aad">uint64_t</a> TOKEN_NAME::getQuotaUsed </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#gad67b43dc23285b01176f4c181c59fc23">AccountName</a>&#160;</td>
          <td class="paramname"><em>owner</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>This API is made available for 3rd parties wanting read access to the users quota of storage used. IF the account doesn't exist a default constructed account will be returned. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">owner</td><td>The account owner </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>uint64_t quota used </dd></dl>

</div>
</div>
<a class="anchor" id="gaa4d95e1e82c4c995e09e400878511924"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct TOKEN_NAME::PACKED </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_t_o_k_e_n___n_a_m_e_1_1_account.html">Account</a>&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Constructor with default zero quantity (balance).</p>
<p>The key is constant because there is only one record per scope/currency/accounts</p>
<p>Balance number of tokens in account</p>
<p>Quota of storage Used</p>
<p>Method to check if accoutn is empty. </p><dl class="section return"><dt>Returns</dt><dd>true if account balance is zero and there is quota used.</dd></dl>

</div>
</div>
<a class="anchor" id="gae28d4ae2e7427857dbae688d353fcba3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct TOKEN_NAME::PACKED </td>
          <td>(</td>
          <td class="paramtype">Link&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Used to set a link to a file </p>
<p>account owner</p>
<p>eos path</p>
<p>ipfs file path</p>
<p>size of file</p>
<p>a flag that signals producers to cache file</p>
<p>a flag that signals producers have accepted storage and cached file</p>
<p>tokens staked per file</p>
<p>name of producer who cached file</p>

</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a class="anchor" id="ga459112cbf883226edcb02b35a674ddcd"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">StorageTokens TOKEN_NAME::Transfer::quantity</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>quantity to transfer </p>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>
